/**
 * 
 */
package threads;

/**
 * For figuring out how threads work.
 * Used while referring to: {@link http://gee.cs.oswego.edu/dl/cpj/mechanics.html} 
 * @author Lucas
 *
 */
public class Play {

	public void go(){
		MyNumRunnable numRunner = new MyNumRunnable();
		Thread t1 = new Thread(); //Created with no arg.
		t1.run(); //Does nothing.
		Thread t2 = new Thread(numRunner); //Thread created with a runnable.
//		t2.run(); //Prints numbers.
		MyAlphRunner alphRunner = new MyAlphRunner();
		Thread t3 = new Thread(alphRunner);
		/*
		* 10	Crisis management
		* 7-9	Interactive, event-driven
		* 4-6	IO-bound
		* 2-3	Background computation
		* 1		Run only if nothing else can
		*/
		t3.setPriority(Thread.MAX_PRIORITY);
		t2.run();
		t3.run();
		System.out.println("T2 priority : " + t2.getPriority() +
				"   T3 priority : " + t3.getPriority() );
	}
	
	public static void main(String[] args) {
		Play play = new Play();
		play.go();
	}

}
